<template>
    <div class="card input">
      <h3>学生成绩填报表</h3>
      <div class="content">
        <div class="item">
          姓名:
          <input type="text" v-model="newStu.name"/>
        </div>
        <div class="item">
          性别:
          <input type="text" v-model="newStu.gender"/>
        </div>
        <div class="item">
          年龄:
          <input type="text" v-model="newStu.age"/>
        </div>
        <div class="item">
          语文:
          <input type="text" v-model="newStu.yw"/>
        </div>
        <div class="item">
          数学:
          <input type="text" v-model="newStu.sx"/>
        </div>
        <div class="item">
          英语:
          <input type="text" v-model="newStu.yy"/>
        </div>
        <div class="item">
          <input type="button" class="btn" value="提交" @click="$('sumbit',newStu)"/>
        </div>
      </div>
    </div>
    </template>
    
    <script>
    import { ref } from "vue";
    export default{
      setup(){
        const newStu=ref({
          name:"",
          age:0,
          gender:"",
          head:"",
          yw:0,
          sx:0,
          yy:0,
          show:false
        })
        const sumbit =()=>{
            stuData.value.push(newStu)
          }
        return{
          newStu,
          sumbit
        }
      }
    }
    </script>